import { StdNoteTextDataV2 } from './note'

// 示例和注的文本textData解析
export class StdItemNoteTextDataV2 extends StdNoteTextDataV2 {
  constructor(node) {
    super(node)
    this.contentList = []
  }
  get data() {
    this.getNumberContent(this.node)
    this.getContent(this.node.firstChild)
    return {
      dataId: this.node?.dataset?.id,
      dataLang: this.node?.dataset?.lang,
      contentList: this.contentList
    }
  }
  // 拼接示例前面的编号
  getNumberContent(node) {
    this.contentList.push({
      dataLang: node.dataset?.lang,
      contentType: 'text',
      contentNumber: node.dataset?.number || null,
      content: '',
      fullContent: this.getFullNumber(node)
    })
  }
}
